package com.n9.qq.android.RegisterProxySvcPack;

import com.n9.qq.android.login.SvcReqRegister;
import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;

/**
 * @author ice
 * @since 2019/3/1 14:05
 */
public final class SvcRequestRegisterNew extends JceStruct {
    public long badge = 0L;
    public SvcRequestGetMsgV2 c2cmsg = null;
    public byte cDisgroupMsgFilter = 0;
    public byte cGetDisPttUrl = 0;
    public byte cGetGroupPttUrl = 0;
    public byte cGroupMask = 0;
    public byte cSubCmd = 0;
    public SvcRequestPullDisMsgSeq confmsg = null;
    public SvcRequestPullDisGroupSeq disgroupmsg = null;
    public SvcRequestPullGroupMsgSeq groupmsg = null;
    public SvcReqGet heartbeat = null;
    public SvcReqRegister regist = null;
    public long uEndSeq = 0L;
    public long ulRequestOptional = 0L;
    public byte[] vCookies = null;
    public byte[] vSaveTraffic = null;
    public byte[] vSig = null;

    public SvcRequestRegisterNew() {
    }

    public SvcRequestRegisterNew(long var1, SvcRequestGetMsgV2 var3, SvcRequestPullGroupMsgSeq var4, SvcRequestPullDisMsgSeq var5, SvcReqRegister var6, byte var7, byte var8, byte var9, long var10, SvcRequestPullDisGroupSeq var12, byte[] var13, byte[] var14, byte[] var15, SvcReqGet var16, byte var17, byte var18, long var19) {
        this.ulRequestOptional = var1;
        this.c2cmsg = var3;
        this.groupmsg = var4;
        this.confmsg = var5;
        this.regist = var6;
        this.cSubCmd = var7;
        this.cGetGroupPttUrl = var8;
        this.cGetDisPttUrl = var9;
        this.badge = var10;
        this.disgroupmsg = var12;
        this.vSaveTraffic = var13;
        this.vCookies = var14;
        this.vSig = var15;
        this.heartbeat = var16;
        this.cDisgroupMsgFilter = var17;
        this.cGroupMask = var18;
        this.uEndSeq = var19;
    }

    @Override
    public void readFrom(JceInputStream var1) {
        this.ulRequestOptional = var1.read(this.ulRequestOptional, 0, true);
        if (c2cmsg == null) {
            c2cmsg = new SvcRequestGetMsgV2();
        }

        this.c2cmsg = (SvcRequestGetMsgV2)var1.read(c2cmsg, 1, false);
        if (groupmsg == null) {
            groupmsg = new SvcRequestPullGroupMsgSeq();
        }

        this.groupmsg = (SvcRequestPullGroupMsgSeq)var1.read(groupmsg, 2, false);
        if (confmsg == null) {
            confmsg = new SvcRequestPullDisMsgSeq();
        }

        this.confmsg = (SvcRequestPullDisMsgSeq)var1.read(confmsg, 3, false);
        if (regist == null) {
            regist = new SvcReqRegister();
        }

        this.regist = (SvcReqRegister)var1.read(regist, 4, false);
        this.cSubCmd = var1.read(this.cSubCmd, 5, false);
        this.cGetGroupPttUrl = var1.read(this.cGetGroupPttUrl, 6, false);
        this.cGetDisPttUrl = var1.read(this.cGetDisPttUrl, 7, false);
        this.badge = var1.read(this.badge, 8, false);
        if (disgroupmsg == null) {
            disgroupmsg = new SvcRequestPullDisGroupSeq();
        }

        this.disgroupmsg = (SvcRequestPullDisGroupSeq)var1.read(disgroupmsg, 9, false);
        if (vSaveTraffic == null) {
            vSaveTraffic = (byte[])(new byte[1]);
            (vSaveTraffic)[0] = 0;
        }

        this.vSaveTraffic = var1.read(vSaveTraffic, 10, false);
        if (vCookies == null) {
            vCookies = (new byte[1]);
            (vCookies)[0] = 0;
        }

        this.vCookies = var1.read(vCookies, 11, false);
        if (vSig == null) {
            vSig = (new byte[1]);
            (vSig)[0] = 0;
        }

        this.vSig = var1.read(vSig, 12, false);
        if (heartbeat == null) {
            heartbeat = new SvcReqGet();
        }

        this.heartbeat = (SvcReqGet)var1.read(heartbeat, 13, false);
        this.cDisgroupMsgFilter = var1.read(this.cDisgroupMsgFilter, 14, false);
        this.cGroupMask = var1.read(this.cGroupMask, 15, false);
        this.uEndSeq = var1.read(this.badge, 16, false);
    }

    @Override
    public void writeTo(JceOutputStream var1) {
        var1.write(this.ulRequestOptional, 0);
        if (this.c2cmsg != null) {
            var1.write(this.c2cmsg, 1);
        }

        if (this.groupmsg != null) {
            var1.write(this.groupmsg, 2);
        }

        if (this.confmsg != null) {
            var1.write(this.confmsg, 3);
        }

        if (this.regist != null) {
            var1.write(this.regist, 4);
        }

        var1.write(this.cSubCmd, 5);
        var1.write(this.cGetGroupPttUrl, 6);
        var1.write(this.cGetDisPttUrl, 7);
        var1.write(this.badge, 8);
        if (this.disgroupmsg != null) {
            var1.write(this.disgroupmsg, 9);
        }

        if (this.vSaveTraffic != null) {
            var1.write(this.vSaveTraffic, 10);
        }

        if (this.vCookies != null) {
            var1.write(this.vCookies, 11);
        }

        if (this.vSig != null) {
            var1.write(this.vSig, 12);
        }

        if (this.heartbeat != null) {
            var1.write(this.heartbeat, 13);
        }

        var1.write(this.cDisgroupMsgFilter, 14);
        var1.write(this.cGroupMask, 15);
        var1.write(this.uEndSeq, 16);
    }
}